<div class="Item hr">
    <div class="current">添加文档</div>
    <div class="fr"><a class="btn" href="{:U('Contype/index')}">栏目列表</a></div>
    <div class="fr"><a class="btn" href="{:U('index')}">文档管理</a></div>
</div>
<form name="form1">
	<input type="hidden" name="content[mid]" value="{$mid}" />
    <div class="Item hr">
        <div class="current">常规信息</div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
        <tr>
            <th width="100">文章标题：</th>
            <td><input id="title" type="text" class="input" size="60" name="content[title]" value="" /></td>
        </tr>
        <tr>
            <th width="100">简短标题：</th>
            <td><input id="title" type="text" class="input" size="30" name="content[shorttitle]" value="" /></td>
        </tr>
        <tr>
            <th width="100">自定义属性：</th>
            <td>
            <volist name='attlist' id='att'>
                <if condition="$att['att'] eq 'j'">
                    <label><input type='checkbox' name='content[flag][]' id='flags{$att.att}' value='{$att.att}' onclick='ShowUrlTr()'> {$att.attname}[{$att.att}]</label>
                <else />
                    <label><input type='checkbox' name='content[flag][]' id='flags{$att.att}' value='{$att.att}'> {$att.attname}[{$att.att}]</label>
                </if>
            </volist>
            </td>
        </tr>
        <tr id="redirecturltr" style="display:none">
            <th width="100">跳转网址：</th>
            <td><input name="addtable[redirecturl]" type="text" id="redirecturl" class="input" size="50" value="" /></td>
        </tr>
        <tr>
            <th width="100">文章栏目：</th>
            <td>
            	<select name="content[typeid]" id="typeid">
                	<option value="0">请选择栏目...</option>
                    <present name="language">
                        <volist name='types' id='m'>
                        <optgroup label="{$m.title}">
                            <volist name='m.cat' id='type'>
                                <option value="{$type.id}" <if condition="$type['id'] eq $tid">selected="true"</if>>{$type.fullname}</option>
                            </volist>
                        </optgroup>
                        </volist>
                    <else/>
                        <volist name='types' id='type'>
                        <option value="{$type.id}" <if condition="$type['id'] eq $tid">selected="true"</if>>{$type.fullname}</option>
                        </volist>
                     </present> 
                </select>
             </td>
        </tr>
        <tr>
        	<th>缩略图：</th>
            <td><input type="text" class="input" name="content[litpic]" id="litpic" size="50" /><input type="button" class="btn btn-open" onclick="SelectImage('form1.litpic');" value="站内选择" name="Submit2">
            <div class="divpre" id="divpicview"></div>
            </td>
        </tr>
        {$addfields|PrintAutoFieldsAdd}
        <tr>
        	<th>关键字：</th>
            <td><input type="text" class="input" name="content[keywords]" id="keywords" size="60" /><span>（多个关键字用","分开）</span></td>
        </tr>
        <tr>
            <th width="100">内容摘要：</th>
            <td><textarea class="jq_watermark" id="description" rows="5" cols="70" name="content[description]"  placeholder="内容摘要"></textarea> </td>
        </tr>
        <eq name="nid" value="image">
        <tr>
            <th width="100">图片集：</th>
            <td>
            <input type="file" name="addtable[imgurls]" id="imgurls"  multiple="true"/>
            </td>
        </tr>
        </eq>
    </table>
    <eq name="nid" value="image">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1" style=" ">
            <tr>
                <td height="160" style="background: url('__PUBLIC__/admin/images/albviewbg.gif') no-repeat scroll 0px 20px rgb(255, 255, 255); padding:0 0 20px 0;">
                    <div style="height:52px; overflow:hidden;" id="divFileProgressContainer"></div>
                    <div id="thumbnails"></div>
                </td>
            </tr>
        </table>
    </eq>
    <div class="Item hr">
        <div class="current">文档内容</div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
    	<tr><td>{:genEditor('addtable[body]', '', 120, 20, '1')}</td></tr>
    </table>
    <div class="Item hr">
        <div class="current">高级参数</div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
    	<tr>
            <th width="100">浏览次数：</th>
            <td width="200"><input type="text" class="input" name="content[click]" id="click" size="30" value="{:rand(100,300)}" /></td>
            <th width="100">标题颜色：</th>
            <td><input type="text" class="input" name="content[color]" id="color" size="20" placeholder="点击选择颜色" /></td>
        </tr>
    	<tr>
            <th width="100">发布时间：</th>
            <td colspan="3"><input type="text" class="input" name="pubdate" id="pubdate" value="{:date('Y-m-d H:i:s')}" size="30" /></td>
        </tr>
    </table>
<div class="commonBtnArea" >
    <button class="btn submit">保存</button> <input type="reset" value="重置" class="btn" />
</div>
</form>

<include file="Content/javascript" />
<script type="text/javascript">
$(function(){
    submitForm("create");
	$("#color").colorpicker({
		fillcolor:true
	});
});
</script>
